import tkinter as tk

root = tk.Tk()
root.title("Tkinter 示例")
root.geometry("400x300")

var = tk.StringVar()
var.set("hello world")
entry = tk.Entry(root,textvariable=var)

entry.pack()
root.mainloop()